package com.app.megaprosoft.DB;

import java.sql.*;

public class Company {
	
    Connect con = new Connect(); 
    Connection conn = con.Connect();
    ResultSet rs = null;
		
		public ResultSet selectCompany() throws Exception {

			String StrSql = "SELECT [OID]," +
											"[LastModified],"+
											"[ModifyDate],"+
											"[ModifyTime],"+
											"[ModifiedBy],"+
											"[UserModify],"+
											"[CreatedDate],"+
											"[CreateDate],"+
											"[CreateTime],"+
											"[CreatedBy],"+
											"[UserCreate],"+
											"[IsActive],"+
											"[IsDeleted],"+
											
											"[CompanyCode],"+
											"[CompanyName],"+
											"[Addr1],"+
											"[Addr2],"+
											"[Addr3],"+
											"[Tel],"+
											"[Fax],"+
											"[Mobile],"+
											"[TaxID],"+
											"[IsPrimary],"+
											"[VatValue],"+
											"[CommercialCode] "+
											
					  	"FROM	[dbo].udfCompany() "
					  + " WHERE [IsDeleted]='0' ";
			
			//System.out.print(StrSql);
			
			return con.selectData(StrSql);
		}
		
		 public void closeConnecttion() throws Exception {
	    	 if (conn != null) {
	             conn.close();
	         }
	    }
	
}
	
		
	
